package com.mingqijia.gassafety.webserver.service;

import com.alibaba.fastjson.JSONArray;
import com.mingqijia.gassafety.db.entity.WarningAlarm;
import com.mingqijia.gassafety.db.entity.WarningRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mingqijia.gassafety.shared.utils.commonUtils.PageUtil;
import com.mingqijia.gassafety.webserver.dto.CallTaskDTO;
import com.mingqijia.gassafety.webserver.request.DisposeRecordRequest;
import com.mingqijia.gassafety.webserver.request.WarningRecordDetailRequest;
import com.mingqijia.gassafety.webserver.request.WarningRecordInfoRequest;
import com.mingqijia.gassafety.webserver.request.WarningRecordListRequest;
import com.mingqijia.gassafety.webserver.response.DisposeRecordResponse;
import com.mingqijia.gassafety.webserver.response.WarningRecordDetailResponse;
import com.mingqijia.gassafety.webserver.response.WarningRecordInfoResponse;
import com.mingqijia.gassafety.webserver.response.WarningRecordResponse;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 预警记录 服务类
 * </p>
 *
 * @author zhangfei  
 * @since 2022-03-08
 */
public interface WarningRecordService extends IService<WarningRecord> {

    /**
     * 通知记录聚合列表
     * @param request
     * @return
     */
    PageUtil<WarningRecordResponse> getList(WarningRecordListRequest request);

    /**
     * 通知记录详情相关信息
     * @param request
     * @return
     */
    WarningRecordDetailResponse recordDetailInfo(WarningRecordDetailRequest request);

    /**
     * 报警记录单次列表
     * @param request
     * @return
     */
    PageUtil<WarningRecordInfoResponse> recordDetailList(WarningRecordInfoRequest request);

    /**
     * 存储外呼记录
     * @param data
     * @param dtuInfos
     * @param phones
     * @param warningAlarm
     * @return
     */
    boolean saveCallList(JSONArray data, Map<String, Object> dtuInfos, List<String> phones,
                         WarningAlarm warningAlarm,String spId, Map<String, Integer> objectTypeMap,String operatorBy,String robotContent);

    PageUtil<DisposeRecordResponse> getRecordList(DisposeRecordRequest request);

    Object createTask(CallTaskDTO request);
    Object createApp( String appName,String appKey,String appSecret,Integer id);

    int CountRecord(String IMEI,String spId);

}
